package com.ming.utils;

/**
 * author : changer
 * date   : 2020/8/12
 * desc   :
 */
public class CommonHelper {


    //

    /**
     * 隐藏手机中间后四位
     * @param phoneNumber
     * @return
     */
    public static final String hidePhoneNumberCenter4(String phoneNumber){
        if (StringHelper.isEmpty(phoneNumber)){
            return "";
        }
        if (phoneNumber.length() != 11){
            return phoneNumber;
        }
        return phoneNumber.substring(0, 3) + "****" + phoneNumber.substring(7, 11);
    }
}
